Ext.define('carManage.view.driverInfo.GridList', {
    extend: 'Ext.grid.Panel',
    store: 'DriverInfoStore',
    alias: 'widget.gridList',
    selModel: Ext.create('Ext.selection.CheckboxModel', {mode: "SIMPLE"}),
    initComponent: function() {
        this.columns = [
            {
                header: '编号',
                sortable: true,
                hidden: true,
                dataIndex: 'id'
            }, {
                header: '姓名',
                sortable: true,
                width: 75,
                dataIndex: 'name'
            }, {
                header: '性别',
                sortable: true,
                width: 65,
                dataIndex: 'sex',
                renderer: function(v) {
                    if (v == 1) {
                        return "男";
                    } else if (v == 2) {
                        return "女";
                    }
                }
            }, {
                header: '出生年月',
                sortable: true,
                width: 90,
                dataIndex: 'born'
            }, {
                header: '身份证号码',
                sortable: true,
                width: 166,
                dataIndex: 'id_code'
            }, {
                header: '电话号码',
                sortable: true,
                dataIndex: 'phone_num'
            }, {
                header: '准驾车型',
                sortable: true,
                width: 84,
                dataIndex: 'car_model'
            }, {
                header: '是否兼职',
                sortable: true,
                width: 90,
                dataIndex: 'sideline',
                renderer: function(v) {
                    if (v === 'yes') {
                        return "是";
                    } else if (v === 'no') {
                        return "否";
                    }
                }
            }, {
                header: '工作经历',
                width: 180,
                dataIndex: 'experience'
            }, {
                header: '个人荣誉',
                width: 180,
                dataIndex: 'glory'
            }, {
                header: '缩写',
                width: 72,
                dataIndex: 'ab'
            }, {
                header: '工龄',
                sortable: false,
                dataIndex: 'workage'
            }
        ];
        
        this.bbar = new Ext.PagingToolbar({
            store: 'DriverInfoStore',
            emptyMsg: '没有数据需要显示',
            displayInfo: true
        });
        this.callParent(arguments);
    }
});